package com.atguigu.lease.common.result;

import lombok.Getter;

/**
 * @author LOGIN
 * @title ResultCodeEnum
 * @create 2025/6/20 22:00
 * @description
 */
@Getter
public enum ResultCodeEnum {
    SUCCESS(200,"SUCCESS",true),
    ERROR(201,"UNKNOW ERROR",false),
    PARAM_ERROR(202, "参数不正确",false),
    SERVICE_ERROR(203, "服务异常",false),
    DATA_ERROR(204, "数据异常",false),
    ILLEGAL_REQUEST(205, "非法请求",false),
    REPEAT_SUBMIT(206, "重复提交",false),
    DELETE_ERROR(207, "请先删除子集",false),
    UPLOAD_DATA_ERROR(208, "非法文件格式",false),

    ADMIN_ACCOUNT_EXIST_ERROR(301, "账号已存在",false),
    ADMIN_CAPTCHA_CODE_ERROR(302, "验证码错误",false),
    ADMIN_CAPTCHA_CODE_EXPIRED(303, "验证码已过期",false),
    ADMIN_CAPTCHA_CODE_NOT_FOUND(304, "未输入验证码",false),


    ADMIN_LOGIN_AUTH(305, "未登陆",false),
    ADMIN_ACCOUNT_NOT_EXIST_ERROR(306, "账号不存在",false),
    ADMIN_ACCOUNT_ERROR(307, "用户名或密码错误",false),
    ADMIN_ACCOUNT_DISABLED_ERROR(308, "该用户已被禁用",false),
    ADMIN_ACCESS_FORBIDDEN(309, "无访问权限",false),

    APP_LOGIN_AUTH(501, "未登陆",false),
    APP_LOGIN_PHONE_EMPTY(502, "手机号码为空",false),
    APP_LOGIN_CODE_EMPTY(503, "验证码为空",false),
    APP_SEND_SMS_TOO_OFTEN(504, "验证法发送过于频繁",false),
    APP_LOGIN_CODE_EXPIRED(505, "验证码已过期",false),
    APP_LOGIN_CODE_ERROR(506, "验证码错误",false),
    APP_ACCOUNT_DISABLED_ERROR(507, "该用户已被禁用",false),


    TOKEN_EXPIRED(601, "token过期",false),
    TOKEN_INVALID(602, "token非法",false);
    ;

    private Integer code;
    private String message;
    private Boolean ok;
    ResultCodeEnum(Integer code, String message, Boolean ok) {
        this.code = code;
        this.message = message;
        this.ok = ok;
    }
}
